__________________________________________________________________________________________________
sample 4 ms submission
class Solution {
public:
    int largestPalindrome(int n) {
        vector<int> ret = {9, 987, 123, 597, 677, 1218, 877, 475};
        return ret[n - 1];
    }
};
__________________________________________________________________________________________________
sample 8160 kb submission
#include <cstdint>

int64_t a[] = {9, 9009, 906609, 99000099, 9966006699, 999000000999, 99956644665999, 9999000000009999};

class Solution {
public:
    int largestPalindrome(int n) {
        return a[n - 1] % 1337;
    }
};
__________________________________________________________________________________________________
